//
//  CommentsTableViewCell.m
//  Final
//
//  Created by lanou3g on 15/12/4.
//  Copyright © 2015年 皮比诺. All rights reserved.
//

#import "CommentsTableViewCell.h"

@implementation CommentsTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;

        [self makeData];
    }
    return self;
    
}
- (void)makeData
{
    
    self.commentsLabel = [[UILabel alloc] init];
    self.commentsLabel.numberOfLines = 0;
    self.commentsLabel.textAlignment = NSTextAlignmentCenter;
       [self.contentView addSubview:self.commentsLabel];
    self.nameLabel = [[UILabel alloc] init];
    self.nameLabel.textAlignment = NSTextAlignmentCenter;
  
    [self.contentView addSubview:self.nameLabel];
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.commentsLabel.frame = CGRectMake(90, 0, CGRectGetWidth(self.contentView.frame) - 100, CGRectGetHeight(self.contentView.frame));
    self.nameLabel.frame = CGRectMake(5, 0, 80, CGRectGetHeight(self.contentView.frame));
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
